function checkSub(){
	
	if(document.getElementById('state').value==''){
		alert('状态不能为空');
		document.getElementById('state').focus();
		return false;
	}
	
	if(document.getElementById('contents').value==''){
		alert('回答内容不能为空');
		document.getElementById('contents').focus();
		return false;
	}
	
	document.addForm.submit();
}

function search(){
	//TODO
	document.indexForm.submit();
}


function updatestate(val){
	var listsize = document.getElementById('listsize').value;
	var pkid_string = '';
	for(var i=0;i<listsize;i++){
		if(document.getElementById('checkone'+i).checked){
			pkid_string += document.getElementById('checkone'+i).value+'|';
		}
	}
	document.getElementById('pkid').value = pkid_string;
	if(pkid_string == ''){
		alert('请选择要操作的信息!');
		return false;
	}
	
	    document.getElementById('pkid').value = pkid_string;
		document.getElementById('state').value = val;
		document.indexForm.action='/doTradeReg.do';
		document.getElementById('bpm_id').value = '1566';
		if(window.confirm('确认提交吗?'))
		{
			document.indexForm.submit();
		}
	
}